import request from "@renderer/utils/request";

//查询数据列表 不分页

export const getDataSourceListNoPage = (params: any) => {
  return request({
    url: "/dataSourceConf/getList",
    method: "get",
    params,
  });
};

// 查询数据源列表 分页

export const getDataSourceList = (params: any) => {
  return request({
    url: "/dataSourceConf/getPageList",
    method: "get",
    params,
  });
};

// 获取详情
export const getDataSourceDetail = (params: any) => {
  return request({
    url: "/dataSourceConf/getInfo",
    method: "get",
    params,
  });
};

//  保存数据源
export const saveDataSource = (data: any) => {
  return request({
    url: "/dataSourceConf/save",
    method: "post",
    data,
  });
};

//修改
export const updateDataSource = (data: any) => {
  return request({
    url: "/dataSourceConf/update",
    method: "put",
    data,
  });
};

//删除
export const deleteDataSource = (ids: any) => {
  return request({
    url: `/dataSourceConf/remove?ids=${ids}`,
    method: "delete",
  });
};
